import redis
from loguru import logger
from cmreslogging.handlers import CMRESHandler
import pymongo
from elasticsearch import Elasticsearch
es = Elasticsearch(hosts="localhost:9200")
pool = redis.ConnectionPool(host='localhost', port=6379, decode_responses=True)
handler = CMRESHandler(hosts=[{'host': 'localhost', 'port': 9200}],
                           auth_type=CMRESHandler.AuthType.NO_AUTH,
                           # host = 'imac',
                           es_index_name="ershoufang_log")


logger.add(handler)
logger.debug('this is a debug message')


client = pymongo.MongoClient("localhost")
db = client['beike_house']

